package gjtx7;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.Scanner;

public class Lnput {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        System.out.println("输入一个文件名:");
        String srt=in.nextLine();
        File f=new File(srt);
        try {
            FileInputStream fin=new FileInputStream(f);
            byte[] b=new byte[fin.available()];
            int i=fin.read(b);
            String rt=new String(b,0,i);
            System.out.println(rt);
            fin.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
